import React from 'react'
import './index.scss'
import T from 'prop-types'
import {Link} from 'react-router-dom'
export default function AddModal(props) {
  const { hide } = props
  const list = [
    { name: '创建群聊', path: '/create-group' },
    {
      name: '添加群聊',
      path: { pathname: '/addFriendAndGroup', query: 'group' },
    },
    {
      name: '添加好友',
      path: { pathname: '/addFriendAndGroup', query: 'friend' },
    },
  ]
  return (
    <div
      className="home-add-modal"
      style={{ display: `${hide ? 'none' : 'block'}` }}
    >
      <div className="home-add-modal-list">
        {list.map((item) => (
          <div key={item.name}>
            <Link to={item.path} style={{ textDecoration: 'none' ,color:'#fff'}}>
              {item.name}
            </Link>
          </div>
        ))}
      </div>
    </div>
  )
}
AddModal.propTypes = {
  hide: T.bool,
}
